package com.zhao.retry.demo;

import lombok.extern.slf4j.Slf4j;
import org.aopalliance.intercept.MethodInvocation;
import org.springframework.retry.interceptor.RetryOperationsInterceptor;
import org.springframework.stereotype.Component;

/**
 * @author pingxx
 * @version 1.0
 * @date 2020/5/22 2:59 下午
 */
@Component
@Slf4j
public class CustomMethodInterceptor extends RetryOperationsInterceptor {
    @Override
    public Object invoke(MethodInvocation methodInvocation) throws Throwable {
        log.info("invoke {} ", methodInvocation);
        return super.invoke(methodInvocation);
    }
}
